﻿using System;
using System.Collections.Generic;
using System.Text;
using FunctionalCLR.Core;

namespace FunctionalCLR.Core.Function.Logic {
    public class EqualNode : LogicOperatorNode {

        public EqualNode()
            : base() {
            this.Value = "==";
        }

        public override FuncNode GetReversedFunction(int index) {
            return new NotEqualNode();
        }

        public override object Evaluate() {
            string lr = Left.Evaluate().ToString();
            string rr = Right.Evaluate().ToString();

            return lr == rr;
        }
    }
}
